﻿using TPOJ.Model;

namespace TPOJ.BLL
{
    public static class MessageBO
    {
        private static readonly TPOJ.IMessaging.IQueueMessage messaging = TPOJ.MessagingFactory.QueueAccess.CreateMessage();

        public static void Insert(Message message)
        {
            messaging.Send(message);
        }

        public static Message ReceiveFromQueue(int timeout)
        {
            return messaging.Receive(timeout);
        }
    }
}
